package com.linxz.video;

import android.os.Bundle;
import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;
import android.widget.RelativeLayout;

import com.linxz.video.videoplayer.VideoAdContext;
import com.linxz.video.videoplayer.event.VideoContextInterface;

/**
 * @author Linxz
 * 创建日期：2019年10月15日 11:51
 * version：v4.5.4
 * 描述：
 */
public class VideoTestActivity extends AppCompatActivity {

    private RelativeLayout videoLayout;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.lib_video_act_home);
        videoLayout=findViewById(R.id.video_layout);
      //  String basePath= Environment.getExternalStorageDirectory().getPath()+"/JChatDemo/recvFiles/5106883659.mp4";
       // videoView.setDataSource("http://192.168.199.216:9999/files/spring.mp4");
        VideoAdContext mAdsdkContext = new VideoAdContext(videoLayout, "http://192.168.199.216:9999/files/spring.mp4");
        mAdsdkContext.setListener(new VideoContextInterface() {
            @Override
            public void onVideoSuccess() {

            }

            @Override
            public void onVideoFailed() {

            }

            @Override
            public void onVideoComplete() {

            }
        });
    }
}
